class FriendBroadcastJob < ActiveJob::Base
  queue_as :default

  def perform(friend)
    id = friend.is_a?(Store) ? friend.id : friend
    ActionCable.server.broadcast "friend_channel_#{id}", {message: "新的好友添加请求!"}
  end
end
